package com.whisperly.echotalk.starryb.netWorkUtils;

import androidx.annotation.Keep;

import com.whisperly.echotalk.bean.ApiResponse;
import com.whisperly.echotalk.bean.VersionCheckRequest;
import com.whisperly.echotalk.bean.VersionCheckResponse;
import com.whisperly.echotalk.bllmodel.AiFeedback;
import com.whisperly.echotalk.bllmodel.BaseResponse;
import com.whisperly.echotalk.bllmodel.ChatHistory;
import com.whisperly.echotalk.bllmodel.ClearClientDto;
import com.whisperly.echotalk.bllmodel.CommonResponse;
import com.whisperly.echotalk.bllmodel.FindPasswordDto;
import com.whisperly.echotalk.bllmodel.FindPasswordResponse;
import com.whisperly.echotalk.bllmodel.LoginDto;
import com.whisperly.echotalk.bllmodel.LoginResponse;
import com.whisperly.echotalk.bllmodel.RegisterDto;
import com.whisperly.echotalk.bllmodel.RegisterResponse;
import com.whisperly.echotalk.bllmodel.ReportMessage;
import com.whisperly.echotalk.bllmodel.ResultBody;
import com.whisperly.echotalk.bllmodel.ReturnedValue;
import com.whisperly.echotalk.bllmodel.SignUp;
import com.whisperly.echotalk.bllmodel.UpdateInfo;
import com.whisperly.echotalk.bllmodel.UpdatePasswordDto;
import com.whisperly.echotalk.bllmodel.UserQuery;
import com.whisperly.echotalk.bllmodel.UserWithChat;
import com.whisperly.echotalk.other.FeedBack;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

@Keep
public interface ApiService {
    @POST("/apis/ai/feedback")
    Call<ReturnedValue> postFeedback(@Body AiFeedback feedback);

    @POST("/apis/ai/report")
    Call<ReturnedValue> postReport(@Body ReportMessage reportMessage);

    @POST("/apis/blink/login")
    Call<ResultBody<LoginResponse>> login(@Body LoginDto loginDto);

    @POST("/apis/blink/register")
    Call<ResultBody<RegisterResponse>> register(@Body RegisterDto registerDto);

    @GET("/apis/blink/delete")
    Call<ResultBody<CommonResponse>> delete(@Query("objectId") String objectId);

    @POST("/apis/blink/update")
    Call<ResultBody<CommonResponse>> update(@Body UserWithChat userWithChat);

    @POST("/apis/blink/updatePassword")
    Call<ResultBody<CommonResponse>> updatePassword(@Body UpdatePasswordDto updatePasswordDto);

    @POST("/apis/blink/findPassword")
    Call<ResultBody<FindPasswordResponse>> findPassword(@Body FindPasswordDto findPassword);

    @POST("/apis/blink/changePassword")
    Call<ResultBody<CommonResponse>> changePassword(@Body UpdatePasswordDto updatePasswordDto);

    @POST("/apis/userQuery/loadDates")
    Call<ResultBody<BaseResponse<List<UserQuery>>>> loadDates(@Body UserQuery UserQuery);

    @POST("/apis/userQuery/loadDatesByDate")
    Call<ResultBody<BaseResponse<List<UserQuery>>>> loadDatesByDate(@Body UserQuery UserQuery);

    @POST("/apis/chatHistory/getChatHistory")
    Call<ResultBody<BaseResponse<List<ChatHistory>>>> getChatHistory(@Body ChatHistory chatHistory);

    @POST("/apis/chatHistory/saveChatHistory")
    Call<ResultBody<CommonResponse>> saveChatHistory(@Body ChatHistory chatHistory);

    @POST("/apis/userQuery/saveUserQuery")
    Call<ResultBody<CommonResponse>> saveUserQuery(@Body UserQuery userQuery);

    @POST("/apis/blink/getUserWithChatByName")
    Call<ResultBody<CommonResponse>> getUserWithChatByName(@Body UserWithChat userWithChat);

    @POST("/apis/chatHistory/deleteBatch")
    Call<ResultBody<CommonResponse>> deleteBatch(@Body ClearClientDto clearClientDto);

    @POST("/apis/sign/signUp")
    Call<ResultBody<CommonResponse>> signUp(@Body SignUp signUp);

    @GET("/apis/sign/getByUserId")
    Call<ResultBody<BaseResponse<SignUp>>> getByUserId(@Query("userId") String userId);

    // 版本检查接口
    @POST("/apis/version/check")
    Call<ApiResponse<VersionCheckResponse>> checkVersion(@Body VersionCheckRequest request);
}